package cn.tx.service.Impl;

import cn.tx.dao.AdminDao;
import cn.tx.model.Admin;
import cn.tx.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminDao adminDao;



    @Override
    public int addAdmin(Admin admin) {
        return adminDao.addAdmin(admin);
    }



    @Override
    public List<Admin> findList(Map<String, Object> querymap) {
        return adminDao.findList(querymap);
    }
    @Override
    public List<Admin> findAll(){
        return adminDao.findAll();
    }
    @Override
    public int delete(String ids){
        return adminDao.delete(ids);
    }

    @Override
    public int UpdateadminById(Admin admin) {
        return adminDao.UpdateadminById(admin);
    }

    @Override
    public int findTotal(Map<String, Object> querymap) {
        return adminDao.findTotal(querymap);
    }

    @Override
    public Admin findByUserName(String name) {
        return adminDao.findByUserName(name);
    }

}

